﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Microsoft.Practices.Composite.Events;

namespace EQual.MainModule.Documents.Views
{
    /// <summary>
    /// Interaction logic for VersionSaveDialog.xaml
    /// </summary>
    public partial class VersionSaveDialog : Window
    {
        public event EventHandler<DataEventArgs<object>> OnVersionUpdated;

        public VersionSaveDialog()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, RoutedEventArgs e)
        {
            this.RequestNewVersionCreation();
        }

        private void RequestNewVersionCreation()
        {
            this.Close();
            OnVersionUpdated(this, new DataEventArgs<object>(new object { }));
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
